<template>
  <div class="cursor-pointer">
    <div class="top-image" @click="goTo(creditProData.url)"><img :src="creditProData.imgUrl" alt=""></div>
    <div class="card-contain">
      <div>{{creditProData.desc}}</div>
      <div>{{creditProData.discount}}</div>
    </div>
  </div>
</template>
<script>
  export default {
    props: {
      creditProData: {
        type: Object,
        default(){
          return {}
        }
      }
    },
    methods: {
      goTo(u) {
        window.location.href = u
      }
    }
  }
</script>
<style scoped lang="less">

@import "../common/less/variable.less";

  .top-image {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    padding: 10px 0;
    img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      border:1px solid ;
    }
  }
  .card-contain {
    text-align: center;
    div + div {
      padding-top: 5px;
    }
  }
  .cursor-pointer {
    cursor: pointer;
  }
</style>